package com.woniuxy.yoga.business.client;

import com.woniuxy.yoga.business.model.dto.orderinfo.DataDto;
import com.woniuxy.yoga.business.model.dto.orderinfo.OrderInfoDto;
import com.woniuxy.yoga.business.model.form.businesspayment.PaymentLogForm;
import com.woniuxy.yoga.business.model.form.coach.StoreQueryNormalCoachForm;
import com.woniuxy.yoga.business.model.form.orderinfo.GetDataForm;
import com.woniuxy.yoga.commons.core.model.PageInfo;
import com.woniuxy.yoga.commons.core.model.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;

@FeignClient(name = "order-service",path = "/order")
public interface OrderClient {

    /**
     * 通过门店id查询订单集合
     * @param storeId 门店id
     * @return
     */
    @GetMapping("/orderInfo/listOrdersByStoreId/{storeId}")
    public Result<List<OrderInfoDto>> listOrdersByStoreId(@PathVariable("storeId") Integer storeId);

    /**
     * 获取一定时间段场馆的订单成交量和流水
     * @param form
     * @return
     */
    @PostMapping("/orderInfo/getDataByTime")
    Result<DataDto> getDataByTime(@RequestBody GetDataForm form);
}
